import re

# 给定区间[-2的31次方, 2的31次方]内的3个整数A、B和C，请判断A+B是否大于C。
def compare(mystr):
    str_list = re.findall(r'.+', mystr)
    num = int(str_list[0].strip())
    for line, i in zip(str_list[1:], range(len(str_list[1:]))):
        nums = line.split(" ")
        if len(nums) > 2:
            if (int(nums[0]) + int(nums[1])) > int(nums[2]):
                print('Case #' + str(i + 1) + ': true')
            else:
                print('Case #' + str(i + 1) + ': false')


test_text = """
3
1 2 3
2 3 4
2147483647 0 2147483646
"""
compare(test_text)
